import request from '@/utils/request'

const api = {
  list: '/sys-performance-log/list',
  query: '/sys-performance-log/query',
  detail: '/sys-performance-log/detail',
  clear: '/sys-performance-log/clear',
  analyze: '/sys-performance-log/analyze'
}

export default {
  // 获取性能日志列表
  list(params) {
    return request({
      url: api.list,
      method: 'get',
      params
    })
  },
  
  // 查询性能日志
  query(params) {
    return request({
      url: api.query,
      method: 'get',
      params
    })
  },
  
  // 获取性能日志详情
  detail(id) {
    return request({
      url: `${api.detail}/${id}`,
      method: 'get'
    })
  },
  
  // 清空性能日志
  clear(params) {
    // console.log(params,1234567890);
    
    return request({
      url: api.clear,
      method: 'delete',
      params
    })
  },
  
  // 性能分析
  analyze(params) {
    return request({
      url: api.analyze,
      method: 'get',
      params
    })
  }
}